<?=$load->view('right.header.php');?>
<br/>
<table class="list">
<tr>
	<td class="toolbar">
    <?=$menu[$caller['clg'][1]]['name']?> &nbsp;
    <a class="active" href="/opus/table.html?tpl=<?=$tpl?>&look=<?=$look?>&clg=<?=$caller['clg'][1]?>&hcs=<?=$htdocs['id']?><?=(empty($cover)?'':'&cover=yes')?>">已添加作品</a>
    <?php if($look!=false){?><a href="/block/write.html?tpl=store.cover&look=<?=$look?>&target=<?=$tpl?>&clg=<?=$caller['clg'][1]?>&hcs=<?=$htdocs['id']?><?=(empty($cover)?'':'&cover=yes')?>">编辑封面</a><?php }?>
    <a href="/opus/write.html?tpl=<?=$tpl?>&look=<?=$look?>&clg=<?=$caller['clg'][1]?>&hcs=<?=$htdocs['id']?><?=(empty($cover)?'':'&cover=yes')?>">添加作品</a>
    <input type="text" name="keyword" value="<?=$search?>" /><input type="button" value="搜索" id="search"/>
    </td>
</tr>
</table>
<br/>
<form action="<?=$basic?>" method="post">
<table class="list">
<thead>
<tr>
	<td width="60">排序</td>
	<td>编号</td>
	<td>画作名称</td>
	<td>画作者</td>
	<td>创作年代</td>
	<td>规格</td>
	<td>添加时间</td>
	<td>操作</td>
</tr>
</thead>
<?php
foreach($opus as $key=>$value){
?>
<tr>
	<td><input type="text" name="order[<?=$value['id']?>]" value="<?=$value['sequence']?>" size="3" /></td>
	<td><?=($key+1)?></td>
	<td>[<?=$menu[$caller['clg'][1]]['name']?>]<a href="<?=$htdocs['host']?>news.html?clg=<?=$look?>&news=<?=$value['id']?>" target="_blank"><?=$value['caption']?></a></td>
	<td width="140"><?=date('Y-m-d H:i:s',$value['release'])?></td>
	<td width="140">
        <a href="/news/write.html?tpl=<?=$tpl?>&clg=<?=$caller['clg'][1]?>&hcs=<?=$htdocs['id']?>&news=<?=$value['id']?>">编辑</a>
        <a confirm="确认删除吗？" href="/news/locked.html?tpl=<?=$tpl?>&clg=<?=$caller['clg'][1]?>&hcs=<?=$htdocs['id']?>&news=<?=$value['id']?>">删除</a>
    </td>
</tr>
<?php
}
?>
<tr>
	<td><input type="submit" value="排序" /></td>
	<td colspan="7">
    	<div class="pagelink"><?=$pagination?></div>
    </td>
</tr>
</table>
<br />
</form>
<script>
$('#search').click(function(){
	var kw = encodeURIComponent( $('input[name=keyword]').val());
	location = '<?=$basic?>&search='+kw;
});
</script>
<?=$load->view('right.footer.php');?>